-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
chore(seer): Use seer quotas endpoints #91937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
group=group, | ||
user=request.user, | ||
force_event_id=force_event_id, | ||
source=SeerAutomationSource.ISSUE_DETAILS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switching to an enum for cleanliness
Codecov ReportAttention: Patch coverage is
|
Files with missing lines | Patch % | Lines |
---|---|---|
src/sentry/seer/issue_summary.py | 80.00% | 3 Missing |
src/sentry/seer/autofix.py | 83.33% | 1 Missing |
src/sentry/tasks/autofix.py | 50.00% | 1 Missing |
Additional details and impacted files
@@ Coverage Diff @@
## master #91937 +/- ##
==========================================
+ Coverage 84.08% 87.87% +3.79%
==========================================
Files 10170 10159 -11
Lines 582941 582614 -327
Branches 22603 22542 -61
==========================================
+ Hits 490140 511977 +21837
+ Misses 92348 70213 -22135
+ Partials 453 424 -29
@@ -134,5 +140,8 @@ def get(self, request: Request, group: Group) -> Response: | |||
"orgHasAcknowledged": org_acknowledgement, | |||
"userHasAcknowledged": user_acknowledgement, | |||
}, | |||
"billing": { | |||
"hasAutofixQuota": has_autofix_quota, | |||
}, | |||
} | |||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan is to return billing and trial information in the setup check so we can display different things on the UI
@@ -808,6 +816,11 @@ def trigger_autofix( | |||
|
|||
group.update(seer_autofix_last_triggered=timezone.now()) | |||
|
|||
# log billing event for seer autofix | |||
quotas.backend.record_seer_run( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, if we set it up like this does it mean that we count a seer run for each time you press start on autofix, including:
- Hit start on a fresh issue without an autofix
- Hit start over then start on an issue with an autofix
- Automation that calls this method
but not if say, you do a rethink from the very beginning of an Autofix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that's the intention
PR reverted: 94d21bb |
This reverts commit e135c10. Co-authored-by: roaga <47861399+roaga@users.noreply.github.com>
This reverts commit e135c10. Co-authored-by: roaga <47861399+roaga@users.noreply.github.com>
Records billable Seer events and checks for available budget before running Seer features. Will follow up with trial status + UI work.